"""django_study URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include, re_path
from django_study import views

urlpatterns = [
    path('admin/', admin.site.urls),
    # path第一个参数：需要访问的路由，就是端口号后面的斜杠，再后面的内容，不需要写整个url
    # 第二个参数：路由绑定的视图函数，只需要函数名，不需要加括号
    path('demo/', views.demo),
    path('app1/', include('demo.urls')),
    # ?P<参数名> 固定语法
    # ()->>把需要获取到的数据进行分组获取
    # re_path('^nav/(?P<nav>[a-zA-Z]+)/$', views.test),
    # path('404/', views.test1, name='not_fount'),
    # path('index/', views.index, name='index'),
    path('demo1/', include('demo1.urls')),
    path('user/', include('user.urls')),
]
